/*
 Navicat Premium Data Transfer

 Source Server         : test
 Source Server Type    : MySQL
 Source Server Version : 50627
 Source Host           : localhost:3306
 Source Schema         : xx_system

 Target Server Type    : MySQL
 Target Server Version : 50627
 File Encoding         : 65001

 Date: 20/03/2024 15:50:37
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for system_menu
-- ----------------------------
DROP TABLE IF EXISTS `system_menu`;
CREATE TABLE `system_menu` (
  `menu_id` int(11) NOT NULL AUTO_INCREMENT,
  `p_id` int(11) DEFAULT NULL,
  `menu_name` varchar(255) COLLATE utf8_bin NOT NULL,
  `menu_url` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `authorize` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '授权，多个逗号分隔所有权限例如：user:list,user:create',
  `menu_type` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '0目录，2菜单，3按钮',
  `menu_logo` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `sort` int(2) unsigned DEFAULT NULL,
  PRIMARY KEY (`menu_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Records of system_menu
-- ----------------------------
BEGIN;
INSERT INTO `system_menu` (`menu_id`, `p_id`, `menu_name`, `menu_url`, `authorize`, `menu_type`, `menu_logo`, `sort`) VALUES (1, -1, '系统管理', NULL, NULL, '0', 'el-icon-s-tools', 0);
INSERT INTO `system_menu` (`menu_id`, `p_id`, `menu_name`, `menu_url`, `authorize`, `menu_type`, `menu_logo`, `sort`) VALUES (2, 1, '用户管理', '/system/user', NULL, '1', 'el-icon-user-solid', 1);
INSERT INTO `system_menu` (`menu_id`, `p_id`, `menu_name`, `menu_url`, `authorize`, `menu_type`, `menu_logo`, `sort`) VALUES (3, 1, '角色管理', '/system/role', NULL, '1', 'el-icon-s-check', 3);
INSERT INTO `system_menu` (`menu_id`, `p_id`, `menu_name`, `menu_url`, `authorize`, `menu_type`, `menu_logo`, `sort`) VALUES (4, 1, '菜单管理', '/system/menu', NULL, '1', 'el-icon-s-order', 2);
INSERT INTO `system_menu` (`menu_id`, `p_id`, `menu_name`, `menu_url`, `authorize`, `menu_type`, `menu_logo`, `sort`) VALUES (5, -1, '用户设置', '', NULL, '0', 'el-icon-s-management', 0);
INSERT INTO `system_menu` (`menu_id`, `p_id`, `menu_name`, `menu_url`, `authorize`, `menu_type`, `menu_logo`, `sort`) VALUES (6, 5, '个人信息', '/user/change', NULL, '1', 'el-icon-message-solid', 1);
INSERT INTO `system_menu` (`menu_id`, `p_id`, `menu_name`, `menu_url`, `authorize`, `menu_type`, `menu_logo`, `sort`) VALUES (7, 5, '修改密码', '/user/password', NULL, '1', 'el-icon-s-release', 2);
INSERT INTO `system_menu` (`menu_id`, `p_id`, `menu_name`, `menu_url`, `authorize`, `menu_type`, `menu_logo`, `sort`) VALUES (8, -1, '客户管理', NULL, NULL, '0', 'el-icon-s-cooperation', 0);
INSERT INTO `system_menu` (`menu_id`, `p_id`, `menu_name`, `menu_url`, `authorize`, `menu_type`, `menu_logo`, `sort`) VALUES (9, 8, '客户录入', '/customer/register', NULL, '1', 'el-icon-s-claim', 1);
INSERT INTO `system_menu` (`menu_id`, `p_id`, `menu_name`, `menu_url`, `authorize`, `menu_type`, `menu_logo`, `sort`) VALUES (10, 8, '洽谈记录', '/customer/manage', NULL, '1', 'el-icon-s-custom', 2);
INSERT INTO `system_menu` (`menu_id`, `p_id`, `menu_name`, `menu_url`, `authorize`, `menu_type`, `menu_logo`, `sort`) VALUES (11, -1, '系统工具', NULL, NULL, '0', 'el-icon-s-data', 0);
INSERT INTO `system_menu` (`menu_id`, `p_id`, `menu_name`, `menu_url`, `authorize`, `menu_type`, `menu_logo`, `sort`) VALUES (12, 11, '登录日志', '/tool/log', NULL, '1', 'el-icon-s-order', 1);
INSERT INTO `system_menu` (`menu_id`, `p_id`, `menu_name`, `menu_url`, `authorize`, `menu_type`, `menu_logo`, `sort`) VALUES (13, 11, '统计报表', '/tool/chart', NULL, '1', 'el-icon-s-platform', 2);
COMMIT;

-- ----------------------------
-- Table structure for system_user
-- ----------------------------
DROP TABLE IF EXISTS `system_user`;
CREATE TABLE `system_user` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '用户唯一标识',
  `user_name` varchar(20) COLLATE utf8mb4_bin NOT NULL,
  `password` varchar(255) COLLATE utf8mb4_bin NOT NULL,
  `face_pic` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  `is_locked` tinyint(4) DEFAULT '0' COMMENT '0|1',
  `role_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;

-- ----------------------------
-- Records of system_user
-- ----------------------------
BEGIN;
INSERT INTO `system_user` (`id`, `user_name`, `password`, `face_pic`, `create_time`, `is_locked`, `role_id`) VALUES (1, 'david', '123', NULL, '2024-03-15 03:01:47', 0, 0);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
